package Exists;

import java.util.*;

public class LinkedHashMap_K {
    public static void main(String[] args) {




/*
        4.双色球规则，双色球每注投注号码由6个红色球号码和1个蓝色球号码组成。红色球号码从1—33中选择，
        红球不可重复；蓝色球号码从1—16中选择。请随机生成一注双色球号码。*/

        Random random = new Random();

        HashSet<Integer> map = new HashSet<>();

        //  HashMap<Integer, Integer> map = new HashMap<>();
        for (int i = 0; i < 7; i++) {

            map.add(random.nextInt(33)+1);
        }


        Iterator<Integer> iterator = map.iterator();
        while (iterator.hasNext()) {
            System.out.print(iterator.next()+",");
        }


    }

}












